package com.yue.pattern.singleton;

/**
 * 懒汉式单例
 */
public class LazyPro {

    private LazyPro() {
    }

    private static LazyPro lazy = null;

    //加锁
    public static synchronized LazyPro getInstance() {
        if (lazy == null) {
            lazy = new LazyPro();
        }
        return lazy;
    }


}
